package model;

import java.util.ArrayList;
import java.util.List;

import codeGenerator.visitor.IMetaModelVisitor;

public class ClasseElement {

	protected String mName = "";

	protected boolean mIsAbstract = false;

	protected String mExtends = "";

	protected String mPackage = "";

	protected final List<AttributeElement> mAttributes = new ArrayList<AttributeElement>();

	protected final List<CompositeElement> mComposites = new ArrayList<CompositeElement>();

	protected String mVisibility = "private";

	public ClasseElement(String aName) {
		this.setName(aName);
	}

	public void setAbstract(boolean aBoolean) {
		this.mIsAbstract = aBoolean;
	}

	public boolean isAbstract() {
		return this.mIsAbstract;
	}

	public void setExtends(String aString) {
		this.mExtends = aString;
	}

	public void addAttribute(AttributeElement anAttributeElement) {
		this.mAttributes.add(anAttributeElement);
	}

	public void addComposite(CompositeElement CompositeElement) {
		this.mComposites.add(CompositeElement);
	}

	public List<CompositeElement> getComposites() {
		return this.mComposites;
	}

	public List<AttributeElement> getAttributes() {
		return this.mAttributes;
	}

	public void accept(IMetaModelVisitor aGenerator) {
		aGenerator.visitClasseElement(this);
	}

	public String getName() {
		return mName;
	}

	public void setName(String mName) {
		this.mName = mName;
	}

	public String getPackage() {
		return this.mPackage;
	}

	public String getVisibility() {
		return this.mVisibility;
	}

	public String getExtends() {
		return mExtends;
	}

	public void setPackage(String mPackage) {
		this.mPackage = mPackage;
	}

	public void setVisibility(String mVisibility) {
		this.mVisibility = mVisibility;
	}

}
